package cn.fz.demo02.controller;

import org.springframework.security.access.annotation.Secured;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @GetMapping("/user/profile")
    @Secured("ROLE_USER")  // 只有 USER 角色才能访问
    public String userProfile() {
        return "User Profile Information";
    }
}
